<script setup>
import { computed } from "vue";
import { useStore } from "vuex";
import home from "@/components/home.vue";
import result from "@/components/result.vue";
import listDetail from "@/components/listDetail.vue";
const store = useStore();
const pageIndex = computed(() => store.state.pageIndex);
</script>

<template>
  <main>
    <div class="want">想了解自己是什么声音吗？</div>
    <div class="focus">关注+灯牌申请连线</div>
    <div class="check">
      声音鉴定
      <div class="insert">
        <span>↑</span>
        <span>插队</span>
      </div>
    </div>
    <home v-if="pageIndex == -1"></home>
    <result v-if="pageIndex == -2"></result>
    <listDetail v-if="pageIndex > -1"></listDetail>
  </main>
</template>

<style scoped lang='scss'>
main {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;
  width: max-content;
  height: max-content;
  min-width: 320px;
  max-width: 375px;
  width: 375px;
  // background-color: #000;
  color: #fff;
  .want {
    text-align: right;
    padding-right: 30px;
    font-size: 22px;
  }

  .focus {
    margin-top: 16px;
    padding-left: 35px;
    font-size: 20px;
  }

  .check {
    margin-top: 6px;
    text-align: center;
    font-size: 30px;
    position: relative;
    .insert {
      position: absolute;
      right: 50px;
      top: 0;
      bottom: 0;
      height: max-content;
      margin: auto;
      display: flex;
      flex-direction: column;
      font-size: 22px;
      color: red;
    }
  }
}
</style>
